package com.struts.service;

import java.util.List;

import com.struts.dao.UserDao;
import com.struts.metier.User;

public class UserService { 

	private UserDao userDao; 
	
	private UserService() {}  
 
	public void addUser(User user)    {  
		userDao.add(user);  
	}

	public User getUserByNameAndMdp(String name, String mdp) { 
		return userDao.getUserByNameAndMdp(name, mdp); 
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	} 

	public  List<User> getAll() {
		return userDao.getAll();
	} 


}